Skip to main content

interrupt

Type

function

Summary

Returns true if the allowInterrupts property is false and the user has attempted to halt the current handler with a key combination.

Syntax

the interrupt
interrupt()

Description

Use the interrupt function within a handler to check whether the user has attempted to stop the handler by typing Control-period or Control-break (on Windows or Unix) or Command-period (on Mac OS).

Normally, pressing one of the key combinations stops any running handlers. If the allowInterrupts property is set to false, the user cannot interrupt a handler in this way.

To let the user interrupt a handler when the allowInterrupts is false, check the interrupt function periodically. If it returns true, the user has attempted to stop the handler. You can then perform any needed cleanup tasks before exiting the handler.

Examples

if the interrupt then doCleanExit

control structure: function

glossary: property, return, key combination, handler, Windows, exit, Mac OS, Unix

message: errorDialog

property: allowInterrupts, lockErrorDialogs

Compatibility and Support

Introduced

LiveCode 1.0

OS

mac

windows

linux

ios

android

Platforms

desktop

server

mobile

Thank you for your feedback!

Was this page helpful?